package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the IND_PRTC_ASIENTO_GARANTIA database table.
 * 
 */
@Entity
@Table(name="IND_PRTC_ASIENTO_GARANTIA")
public class IndPrtcAsientoGarantia implements Serializable {
	private static final long serialVersionUID = 1L;
	private IndPrtcAsientoGarantiaPK id;
	private String agntSync;
	private Date tsUltSync;
	private AsientoGarantia asientoGarantia;

    public IndPrtcAsientoGarantia() {
    }


	@EmbeddedId
	public IndPrtcAsientoGarantiaPK getId() {
		return this.id;
	}

	public void setId(IndPrtcAsientoGarantiaPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to AsientoGarantia
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="COD_ACTO", referencedColumnName="COD_ACTO", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="NS_ASIENTO", referencedColumnName="NS_ASIENTO", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="REFNUM_PART", referencedColumnName="REFNUM_PART", nullable=false, insertable=false, updatable=false)
		})
	public AsientoGarantia getAsientoGarantia() {
		return this.asientoGarantia;
	}

	public void setAsientoGarantia(AsientoGarantia asientoGarantia) {
		this.asientoGarantia = asientoGarantia;
	}
	
}